<template>
<div>
   <!-- 轮播图 -->
    <el-carousel class="" :interval="4000" type="card">
      <el-carousel-item v-for="(item,index) in banners" :key="index" >
        <img :src="item.imageUrl" alt="" />
      </el-carousel-item>
    </el-carousel>
    </div>
</template>
<script>
import axios from 'axios';
export default {
  name:'banners',
  data(){
    return{
      banners:[]
    }
  },
    //轮播图
  created(){
    axios({
      url:'https://autumnfish.cn/banner',
      method:'get',
    }).then(res=>{
     /*  console.log(res) */
      this.banners=res.data.banners
    })
  },
  methods:{

  }
}
</script>

<style>

</style>